package csvm_v3.components;

/**
 * CoinContainer mewakili wadah koin, atribut dari CoinContainer mencatat jumlah
 * koin dime, nickel, dan quarter
 *
 * @author Muhmammad Anis
 */
public class CoinContainer  {

    /**
     * mengisikan jumlah dime
     *
     * @param dimeCount jumlah dime
     */
    public void setDimeCount(Integer dimeCount) {        
        this.dimeCount = dimeCount;        
    }

    /**
     * mengisikan jumlah nickel
     *
     * @param nickelCount jumlah nickel
     */
    public void setNickelCount(Integer nickelCount) {        
        this.nickelCount = nickelCount;        
    }

    /**
     * mengisikan jumlah quarter
     *
     * @param quarterCount jumlah quarter
     */
    public void setQuarterCount(Integer quarterCount) {        
        this.quarterCount = quarterCount;        
    }

    /**
     * mendapatkan jumlah dime
     *
     * @return jumlah dime
     */
    public Integer getDimeCount() {
        return dimeCount;
    }

    /**
     * mendapatkan jumlah nickel
     *
     * @return julmah nickel
     */
    public Integer getNickelCount() {
        return nickelCount;
    }

    /**
     * mendapatkan jumlah quarter
     *
     * @return jumlah quarter
     */
    public Integer getQuarterCount() {
        return quarterCount;
    }
    /**
     * jumlah dime
     */
    protected Integer dimeCount;
    /**
     * jumlah nickel
     */
    protected Integer nickelCount;
    /**
     * jumlah quarter
     */
    protected Integer quarterCount;

    /**
     * mengosongkan koin dalam container
     */
    public void emptyCoins() {        
        dimeCount = 0;
        nickelCount = 0;
        quarterCount = 0;        
    }

    /**
     * konsturktor default CoinContainer
     */
    public CoinContainer() {
        super();
        dimeCount = 0;
        nickelCount = 0;
        quarterCount = 0;
    }

    /**
     * konstruktor berparameter CoinContainer
     *
     * @param dimeCount jumlah dime
     * @param nickelCount jumlah nickel
     * @param quarterCount jumlah quarter
     */
    public CoinContainer(Integer dimeCount, Integer nickelCount, Integer quarterCount) {
        super();
        this.dimeCount = dimeCount;
        this.nickelCount = nickelCount;
        this.quarterCount = quarterCount;
    }
}
